Optimal. Leaf size=45 \[ \frac {a (c+d x)^2}{2 d}-\frac {a (c+d x) \cos (e+f x)}{f}+\frac {a d \sin (e+f x)}{f^2} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.03, antiderivative size = 45, normalized size of antiderivative = 1.00, number of steps
used = 4, number of rules used = 3, integrand size = 16, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.188, Rules used = {3398, 3377,
2717} \begin {gather*} -\frac {a (c+d x) \cos (e+f x)}{f}+\frac {a (c+d x)^2}{2 d}+\frac {a d \sin (e+f x)}{f^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 2717
Rule 3377
Rule 3398
Rubi steps
\begin {align*} \int (c+d x) (a+a \sin (e+f x)) \, dx &=\int (a (c+d x)+a (c+d x) \sin (e+f x)) \, dx\\ &=\frac {a (c+d x)^2}{2 d}+a \int (c+d x) \sin (e+f x) \, dx\\ &=\frac {a (c+d x)^2}{2 d}-\frac {a (c+d x) \cos (e+f x)}{f}+\frac {(a d) \int \cos (e+f x) \, dx}{f}\\ &=\frac {a (c+d x)^2}{2 d}-\frac {a (c+d x) \cos (e+f x)}{f}+\frac {a d \sin (e+f x)}{f^2}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.19, size = 51, normalized size = 1.13 \begin {gather*} -\frac {a ((e+f x) (d e-2 c f-d f x)+2 f (c+d x) \cos (e+f x)-2 d \sin (e+f x))}{2 f^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(89\) vs.
\(2(43)=86\).
time = 0.03, size = 90, normalized size = 2.00
method | result | size |
risch | \(\frac {d a \,x^{2}}{2}+a c x -\frac {a \left (d x +c \right ) \cos \left (f x +e \right )}{f}+\frac {a d \sin \left (f x +e \right )}{f^{2}}\) | \(42\) |
derivativedivides | \(\frac {-a c \cos \left (f x +e \right )+\frac {a d e \cos \left (f x +e \right )}{f}+\frac {a d \left (\sin \left (f x +e \right )-\left (f x +e \right ) \cos \left (f x +e \right )\right )}{f}+a c \left (f x +e \right )-\frac {a d e \left (f x +e \right )}{f}+\frac {a d \left (f x +e \right )^{2}}{2 f}}{f}\) | \(90\) |
default | \(\frac {-a c \cos \left (f x +e \right )+\frac {a d e \cos \left (f x +e \right )}{f}+\frac {a d \left (\sin \left (f x +e \right )-\left (f x +e \right ) \cos \left (f x +e \right )\right )}{f}+a c \left (f x +e \right )-\frac {a d e \left (f x +e \right )}{f}+\frac {a d \left (f x +e \right )^{2}}{2 f}}{f}\) | \(90\) |
norman | \(\frac {\frac {2 a c \left (\tan ^{2}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{f}+\frac {a \left (c f -d \right ) x}{f}+\frac {a \left (c f +d \right ) x \left (\tan ^{2}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{f}+\frac {d a \,x^{2}}{2}+\frac {2 d a \tan \left (\frac {f x}{2}+\frac {e}{2}\right )}{f^{2}}+\frac {d a \,x^{2} \left (\tan ^{2}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{2}}{1+\tan ^{2}\left (\frac {f x}{2}+\frac {e}{2}\right )}\) | \(112\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 103 vs.
\(2 (45) = 90\).
time = 0.31, size = 103, normalized size = 2.29 \begin {gather*} \frac {2 \, {\left (f x + e\right )} a c + \frac {{\left (f x + e\right )}^{2} a d}{f} - 2 \, a c \cos \left (f x + e\right ) - \frac {2 \, {\left (f x + e\right )} a d e}{f} + \frac {2 \, a d \cos \left (f x + e\right ) e}{f} - \frac {2 \, {\left ({\left (f x + e\right )} \cos \left (f x + e\right ) - \sin \left (f x + e\right )\right )} a d}{f}}{2 \, f} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.38, size = 53, normalized size = 1.18 \begin {gather*} \frac {a d f^{2} x^{2} + 2 \, a c f^{2} x + 2 \, a d \sin \left (f x + e\right ) - 2 \, {\left (a d f x + a c f\right )} \cos \left (f x + e\right )}{2 \, f^{2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A]
time = 0.09, size = 68, normalized size = 1.51 \begin {gather*} \begin {cases} a c x - \frac {a c \cos {\left (e + f x \right )}}{f} + \frac {a d x^{2}}{2} - \frac {a d x \cos {\left (e + f x \right )}}{f} + \frac {a d \sin {\left (e + f x \right )}}{f^{2}} & \text {for}\: f \neq 0 \\\left (a \sin {\left (e \right )} + a\right ) \left (c x + \frac {d x^{2}}{2}\right ) & \text {otherwise} \end {cases} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 1.51, size = 47, normalized size = 1.04 \begin {gather*} \frac {1}{2} \, a d x^{2} + a c x + \frac {a d \sin \left (f x + e\right )}{f^{2}} - \frac {{\left (a d f x + a c f\right )} \cos \left (f x + e\right )}{f^{2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.10, size = 54, normalized size = 1.20 \begin {gather*} \frac {a\,\left (d\,x^2+2\,c\,x\right )}{2}-\frac {\frac {a\,f\,\left (2\,c\,\cos \left (e+f\,x\right )+2\,d\,x\,\cos \left (e+f\,x\right )\right )}{2}-a\,d\,\sin \left (e+f\,x\right )}{f^2} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________